package com.key.mapper;

import com.key.entity.CArea;
import com.key.entity.PArea;

import java.util.List;
import java.util.Map;

/**
 * @author wei
 * @create 2023-02-21 17:44
 */
public interface CAreaMapper {

    /**
     * 根据地区名查地区id
     * @author wei
     * @param cAreaName
     * @return
     */
    Long selectCAreaIdByCAreaName(String cAreaName);

    List<PArea> selectAllPArea();
    PArea selectPAreaByPAreaId(Integer id);
    PArea selectPAreaByPAreaName(String pAreaName);
    List<CArea> selectAllCArea(String pAreaName);
    int insertPArea(PArea pArea);
    int insertCArea(PArea pArea);
    int addCArea(CArea cArea);
    CArea selectCAreaByCAreaName(String cAreaName);
    CArea selectCAreaById(Integer id);

    int disableCArea(Map map);
    int disablePArea(Map map);
    int selectCIdByCTopArea(String cTopArea);
    int deleteCAreaById(Integer id);
    int deletePAreaById(Integer id);
    PArea findPAreaByCTopArea(String cTopArea);
    int updatePArea(CArea cArea);
    int updateCArea(CArea cArea);
}
